package com.qf.device.mapper;

import com.qf.device.entity.DeviceType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.dto.PageDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 设备类型表 Mapper 接口
 * </p>
 *
 * @author zhu
 * @since 2023-10-26
 */
@Mapper
public interface DeviceTypeMapper extends BaseMapper<DeviceType> {
    List<DeviceType> findAll(@Param("pageDto") PageDto<DeviceType> pageDto, @Param("industryId") Long industryId, @Param("deviceType") int deviceType, @Param("name") String name);

    Long count(@Param("pageDto") PageDto<DeviceType> pageDto,@Param("industryId") Long industryId,@Param("deviceType") int deviceType,@Param("name") String name);

    @Select("SELECT\n" +
            "\tqf_device_type.`name`, \n" +
            "\tqf_device_type.id\n" +
            "FROM\n" +
            "\tqf_device_type")
    List<DeviceType>findDeviceName();
}
